Integrand size = 22, antiderivative size = 276 \[ \int (g x)^m (d+e x)^3 \left (a+c x^2\right )^p \, dx=\frac {3 d e^2 (g x)^{1+m} \left (a+c x^2\right )^{1+p}}{c g (3+m+2 p)}+\frac {e^3 (g x)^{2+m} \left (a+c x^2\right )^{1+p}}{c g^2 (4+m+2 p)}-\frac {d \left (3 a e^2 (1+m)-c d^2 (3+m+2 p)\right ) (g x)^{1+m} \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {1+m}{2},-p,\frac {3+m}{2},-\frac {c x^2}{a}\right )}{c g (1+m) (3+m+2 p)}-\frac {e \left (a e^2 (2+m)-3 c d^2 (4+m+2 p)\right ) (g x)^{2+m} \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {2+m}{2},-p,\frac {4+m}{2},-\frac {c x^2}{a}\right )}{c g^2 (2+m) (4+m+2 p)} \]
[Out]
Time = 0.30 (sec) , antiderivative size = 254, normalized size of antiderivative = 0.92, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1823, 822, 372, 371} \[ \int (g x)^m (d+e x)^3 \left (a+c x^2\right )^p \, dx=\frac {e (g x)^{m+2} \left (a+c x^2\right )^p \left (\frac {c x^2}{a}+1\right )^{-p} \left (\frac {3 d^2}{m+2}-\frac {a e^2}{c (m+2 p+4)}\right ) \operatorname {Hypergeometric2F1}\left (\frac {m+2}{2},-p,\frac {m+4}{2},-\frac {c x^2}{a}\right )}{g^2}+\frac {d (g x)^{m+1} \left (a+c x^2\right )^p \left (\frac {c x^2}{a}+1\right )^{-p} \left (\frac {d^2}{m+1}-\frac {3 a e^2}{c (m+2 p+3)}\right ) \operatorname {Hypergeometric2F1}\left (\frac {m+1}{2},-p,\frac {m+3}{2},-\frac {c x^2}{a}\right )}{g}+\frac {3 d e^2 (g x)^{m+1} \left (a+c x^2\right )^{p+1}}{c g (m+2 p+3)}+\frac {e^3 (g x)^{m+2} \left (a+c x^2\right )^{p+1}}{c g^2 (m+2 p+4)} \]
[In]
[Out]
Rule 371
Rule 372
Rule 822
Rule 1823
Rubi steps \begin{align*} \text {integral}& = \frac {e^3 (g x)^{2+m} \left (a+c x^2\right )^{1+p}}{c g^2 (4+m+2 p)}+\frac {\int (g x)^m \left (a+c x^2\right )^p \left (c d^3 (4+m+2 p)-e \left (a e^2 (2+m)-3 c d^2 (4+m+2 p)\right ) x+3 c d e^2 (4+m+2 p) x^2\right ) \, dx}{c (4+m+2 p)} \\ & = \frac {3 d e^2 (g x)^{1+m} \left (a+c x^2\right )^{1+p}}{c g (3+m+2 p)}+\frac {e^3 (g x)^{2+m} \left (a+c x^2\right )^{1+p}}{c g^2 (4+m+2 p)}+\frac {\int (g x)^m \left (-c d (4+m+2 p) \left (3 a e^2 (1+m)-c d^2 (3+m+2 p)\right )-c e (3+m+2 p) \left (a e^2 (2+m)-3 c d^2 (4+m+2 p)\right ) x\right ) \left (a+c x^2\right )^p \, dx}{c^2 (3+m+2 p) (4+m+2 p)} \\ & = \frac {3 d e^2 (g x)^{1+m} \left (a+c x^2\right )^{1+p}}{c g (3+m+2 p)}+\frac {e^3 (g x)^{2+m} \left (a+c x^2\right )^{1+p}}{c g^2 (4+m+2 p)}+\left (d \left (d^2-\frac {3 a e^2 (1+m)}{c (3+m+2 p)}\right )\right ) \int (g x)^m \left (a+c x^2\right )^p \, dx+\frac {\left (e \left (3 d^2-\frac {a e^2 (2+m)}{c (4+m+2 p)}\right )\right ) \int (g x)^{1+m} \left (a+c x^2\right )^p \, dx}{g} \\ & = \frac {3 d e^2 (g x)^{1+m} \left (a+c x^2\right )^{1+p}}{c g (3+m+2 p)}+\frac {e^3 (g x)^{2+m} \left (a+c x^2\right )^{1+p}}{c g^2 (4+m+2 p)}+\left (d \left (d^2-\frac {3 a e^2 (1+m)}{c (3+m+2 p)}\right ) \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p}\right ) \int (g x)^m \left (1+\frac {c x^2}{a}\right )^p \, dx+\frac {\left (e \left (3 d^2-\frac {a e^2 (2+m)}{c (4+m+2 p)}\right ) \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p}\right ) \int (g x)^{1+m} \left (1+\frac {c x^2}{a}\right )^p \, dx}{g} \\ & = \frac {3 d e^2 (g x)^{1+m} \left (a+c x^2\right )^{1+p}}{c g (3+m+2 p)}+\frac {e^3 (g x)^{2+m} \left (a+c x^2\right )^{1+p}}{c g^2 (4+m+2 p)}+\frac {d \left (d^2-\frac {3 a e^2 (1+m)}{c (3+m+2 p)}\right ) (g x)^{1+m} \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p} \, _2F_1\left (\frac {1+m}{2},-p;\frac {3+m}{2};-\frac {c x^2}{a}\right )}{g (1+m)}+\frac {e \left (3 d^2-\frac {a e^2 (2+m)}{c (4+m+2 p)}\right ) (g x)^{2+m} \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p} \, _2F_1\left (\frac {2+m}{2},-p;\frac {4+m}{2};-\frac {c x^2}{a}\right )}{g^2 (2+m)} \\ \end{align*}
Time = 0.22 (sec) , antiderivative size = 182, normalized size of antiderivative = 0.66 \[ \int (g x)^m (d+e x)^3 \left (a+c x^2\right )^p \, dx=x (g x)^m \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p} \left (\frac {d^3 \operatorname {Hypergeometric2F1}\left (\frac {1+m}{2},-p,\frac {3+m}{2},-\frac {c x^2}{a}\right )}{1+m}+e x \left (\frac {3 d^2 \operatorname {Hypergeometric2F1}\left (\frac {2+m}{2},-p,\frac {4+m}{2},-\frac {c x^2}{a}\right )}{2+m}+e x \left (\frac {3 d \operatorname {Hypergeometric2F1}\left (\frac {3+m}{2},-p,\frac {5+m}{2},-\frac {c x^2}{a}\right )}{3+m}+\frac {e x \operatorname {Hypergeometric2F1}\left (\frac {4+m}{2},-p,\frac {6+m}{2},-\frac {c x^2}{a}\right )}{4+m}\right )\right )\right ) \]
[In]
[Out]
\[\int \left (g x \right )^{m} \left (e x +d \right )^{3} \left (c \,x^{2}+a \right )^{p}d x\]
[In]
[Out]
\[ \int (g x)^m (d+e x)^3 \left (a+c x^2\right )^p \, dx=\int { {\left (e x + d\right )}^{3} {\left (c x^{2} + a\right )}^{p} \left (g x\right )^{m} \,d x } \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 113.06 (sec) , antiderivative size = 230, normalized size of antiderivative = 0.83 \[ \int (g x)^m (d+e x)^3 \left (a+c x^2\right )^p \, dx=\frac {a^{p} d^{3} g^{m} x^{m + 1} \Gamma \left (\frac {m}{2} + \frac {1}{2}\right ) {{}_{2}F_{1}\left (\begin {matrix} - p, \frac {m}{2} + \frac {1}{2} \\ \frac {m}{2} + \frac {3}{2} \end {matrix}\middle | {\frac {c x^{2} e^{i \pi }}{a}} \right )}}{2 \Gamma \left (\frac {m}{2} + \frac {3}{2}\right )} + \frac {3 a^{p} d^{2} e g^{m} x^{m + 2} \Gamma \left (\frac {m}{2} + 1\right ) {{}_{2}F_{1}\left (\begin {matrix} - p, \frac {m}{2} + 1 \\ \frac {m}{2} + 2 \end {matrix}\middle | {\frac {c x^{2} e^{i \pi }}{a}} \right )}}{2 \Gamma \left (\frac {m}{2} + 2\right )} + \frac {3 a^{p} d e^{2} g^{m} x^{m + 3} \Gamma \left (\frac {m}{2} + \frac {3}{2}\right ) {{}_{2}F_{1}\left (\begin {matrix} - p, \frac {m}{2} + \frac {3}{2} \\ \frac {m}{2} + \frac {5}{2} \end {matrix}\middle | {\frac {c x^{2} e^{i \pi }}{a}} \right )}}{2 \Gamma \left (\frac {m}{2} + \frac {5}{2}\right )} + \frac {a^{p} e^{3} g^{m} x^{m + 4} \Gamma \left (\frac {m}{2} + 2\right ) {{}_{2}F_{1}\left (\begin {matrix} - p, \frac {m}{2} + 2 \\ \frac {m}{2} + 3 \end {matrix}\middle | {\frac {c x^{2} e^{i \pi }}{a}} \right )}}{2 \Gamma \left (\frac {m}{2} + 3\right )} \]
[In]
[Out]
\[ \int (g x)^m (d+e x)^3 \left (a+c x^2\right )^p \, dx=\int { {\left (e x + d\right )}^{3} {\left (c x^{2} + a\right )}^{p} \left (g x\right )^{m} \,d x } \]
[In]
[Out]
\[ \int (g x)^m (d+e x)^3 \left (a+c x^2\right )^p \, dx=\int { {\left (e x + d\right )}^{3} {\left (c x^{2} + a\right )}^{p} \left (g x\right )^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int (g x)^m (d+e x)^3 \left (a+c x^2\right )^p \, dx=\int {\left (g\,x\right )}^m\,{\left (c\,x^2+a\right )}^p\,{\left (d+e\,x\right )}^3 \,d x \]
[In]
[Out]